<?php
namespace app\tours\model;

use think\model\Relation; 

class User extends Relation{

	protected $link = array(
	    'user_info' => array(
		'mapping_type' => BELONGS_TO,
		'class_name' => 'user_info',
		'foreign_key' => 'id',
		'mapping_fields' => 'realname,sex',
		'as_fields' => 'realname,sex',
		'parent_key' => 'user_id'
	    )
	);



}
